<extend name="Base:base" />
<block name="head">
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/js/jquery-ui-1.10.4.custom.js"></script>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/jquery-ui-1.10.4.custom.css" />
</block>
<block name="title">{$title}</block>
<block name="content">
    <a href="{:U('Admin/Article/add')}" class="add">添加文章</a>
    <div id="content">
        <table class="table">
            <tr>
                <th>id</th>
                <th>标题</th>
                <th>作者</th>
                <th>对应菜单</th>
                <th>发布时间</th>
                <th>修改时间</th>
                <th>是否显示</th>
                <th>操作</th>
            </tr>
            <foreach name="articles" item="article">
                <tr>
                    <td>
                    [<a href="{:U('Admin/Article/view',array('id'=>$article['id']))}">{$article.id}</a>]
                    </td>
                    <td>{$article.title}</td>
                    <td>{$article.author}</td>
                    <td>{$article.article_type.name}</td>
                    <td>{$article.publish_time}</td>
                    <td>{$article.update_time}</td>
                    <td>
                        <if condition="$article['is_active'] eq 1">显示<else />不显示</if>
                    </td>
                    <td>
                        【<a href="{:U('Admin/Article/view',array('id'=>$article['id']))}">查看</a>】
                        【<a href="{:U('Admin/Article/edit',array('id'=>$article['id']))}">修改</a>】
                        【<a onclick="return confirm('确认要删除该文章？');" href="{:U('Admin/Article/delete',array('id'=>$article['id']))}" >删除</a>】
                    </td>
                </tr>
            </foreach>
        </table>
        <div class="digg">{$page}</div>
    </div>
</block>